const mysql = require('mysql2/promise');
const config = require('../../config');

const pool = mysql.createPool({
    host: config.MYSQL.host,
    user: config.MYSQL.user,
    port: config.MYSQL.port,
    password: config.MYSQL.password,
    database: config.MYSQL.database,
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0
});

module.exports = pool;